﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace FilesArranger
{
	public class FakeTreeToDo : ITreeToDo
	{
		DivNode[] ITreeToDo.LoadChildren(string sourcePath)
		{
			int l = sourcePath.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries).Length;

			DivNode treeNode = new DivNode();
			treeNode.Text = "Level " + l;
			treeNode.Value = "Level " + l;

			treeNode.TypeIcon = "_folder";

			treeNode.ToolTip = "";
			treeNode.ImageToolTip = "Level " + l;
			treeNode.ExpandCollapseStatus = ExpandCollapseIconEnum.PopulateExpand;
			treeNode.ShowTypeIcon = true;
			treeNode.ShowCheckBox = false;
			treeNode.NavigateHref = "#";

			int size;
			if (!int.TryParse(HttpContext.Current.Request[""], out size))
			{
				size = 1000;
			}
			DivNode[] nodes = new DivNode[size];
			for (int i = 0; i < nodes.Length; i++)
			{
				nodes[i] = treeNode;
			}

			return nodes;
		}

		void ITreeToDo.DeleteChildNode(string sourcePath, DivNode node, ToDoCallBack toDoCallback)
		{
			throw new NotImplementedException();
		}

		void ITreeToDo.CreateFolderNode(string sourcePath, DivNode node, ToDoCallBack toDoCallback)
		{
			throw new NotImplementedException();
		}

		DivNode[] ITreeToDo.Refresh(IDictionary<string, object> pathsExpandRecord)
		{
			throw new NotImplementedException();
		}


		void ITreeToDo.MoveFolderNode(string sourcePath, string destinationPath, ToDoCallBack toDoCallback)
		{
			throw new NotImplementedException();
		}

		void ITreeToDo.MoveFileNode(string sourcePath, string destinationPath, ToDoCallBack toDoCallback)
		{
			throw new NotImplementedException();
		}


		void ITreeToDo.CreateFileNode(string sourcePath, DivNode node, ToDoCallBack toDoCallback)
		{
			throw new NotImplementedException();
		}
	}
}